This application incorporates by reference Taiwanese application Serial No. 090107635, Filed on Mar. 30, 2001.
1. Field of the Invention
This invention relates to a device for detecting power sources, and more particularly, to a device for detecting and recognizing power sources of a hardware device.
2. Description of the Related Art
Nowadays, along with developments in the computer industry, the Internet has also spread to every corner of the world with amazing speed and ushered in the real coming of the information era. In the contemporary information environment, there are various peripherals needing to be linked together. Both communication between host computers and their peripheral devices, and the information exchange between consuming products and information products, require communication interfaces in order to achieve correct information flow among each facility. According to traditional methods, the most frequently used communication interface is the RS-232 or parallel interface, and so on. But both have the disadvantages of low throughput and inconvenient linkage and so on. In order to meet the demand of information flow in the E world, further advanced communication interfaces must be developed to meet this demand. After considering many aspects, the USB and IEEE-1394 communication interfaces were then invented. The RS-232 communication interface and the parallel communication interface are gradually stepping into history because both USB and IEEE-1394 have the advantages of hot-plugging and a high transfer rate. In the future, USB and IEEE-1394 will replace the older communication interfaces and become the future stars on the stage of information.
As it is known that the communication interfaces, USB and IEEE-1394, both can be linked to many hardware devices. According to present technology, a USB interface alone can at most link 127 hardware devices, and an IEEE-1394 interface alone can at most link 63 hardware devices. Please refer to FIG. 1, which shows the coupling relationship between a PC and a hardware device. It should be noted that not every hardware device is accompanied with its own native power. Therefore, the USB and IEEE-1394 communication interfaces need to be equipped with cable power in order to provide power for some hardware devices without native power, such as a keyboard, a mouse, and so on. Those belonging to hardware devices without native power must rely on cable power to maintain their normal function. However, digital cameras belong to hardware devices with native power, so their own power supply can be used. It is not necessary for them to use the cable power of a communication interface.
But because of some factors, for example, for convenient usage, which causes the situation that some hardware device could not supply power for itself, then the hardware device needs to reply on the other linked devices on the network or the mainframe to supply power. In order to make power management more efficient, it needs an electric circuit to tell that every hardware device is at present using it""s own native power or the cable power from other connected devices. According to present methods, this electric circuit for detecting power sources is almost made up of a simple voltage check and a logical electric circuit by using several transistors and diodes to carry out the function. Please refer to FIG. 2, which illustrates a structure of a traditional electric circuit. FIG. 2 shows an electric circuit for recognizing power sources connected to a controller in traditional hardware devices. The electric circuit for recognizing power sources consists of several diodes, transistors, and resistors. And it comes with a native power Vnp as an input signal of the electric circuit. The coupling relationship of each device in the electric circuit is illustrated in FIG. 2. It should be noted that this electric circuit for recognizing power sources is constructed outside a controller 230. And the specification of the controller can conform the interfaces that match the specifications of USB, IEEE1394, and so on. If the hardware device is using its native power Vnp, the voltage of the collector of the transistor Q1 should be logic 0, and the voltage of the collector of the transistor Q2 should be logic 1. The voltage of the collector of the transistor Q1 is fed into a signal end PC0 of the controller 230, and the voltage of the collector of the transistor Q2 is fed into a signal end PC2 of the controller 230, the controller 230 can tell whether the power source, which this hardware device is using, is the native power Vnp according to the logic situations of the signal end PC0 and the signal end PC2.
From the other viewpoint, if the hardware device is not using the native power Vnp, the voltage of the collector of the transistor Q1 should be logic 1, and the voltage of the collector of the transistor Q2 should be logic 0. Therefore, the signal end PC0 of the controller 230 should be logic 1, and the signal end PC2 should be logic 0. According to the logic situations of the signal end PC0 and the signal end PC2 in the controller 230, it is known that the power source used by this hardware device at present is the external power, such as cable power. Therefore, by detecting the logic situations of the signal end PC0 and the signal end PC2, the controller 230 can tell whether the power source, which this hardware device is using, is the external power or the native power.
According to the above description, the power source of the hardware device can be exactly known by the installation of the recognizing electric circuit. However, it should be noted that the recognizing electric circuit is installed outside the controller, that is, the dimension of the circuit board increases due to the insertion of the recognizing electric circuit. This method seems not very economical under the requirements of reducing product volume and the cost.
Furthermore, the voltage of native power used by a hardware device usually ranges from 8V to 40V, typically 12V. According to the above-mentioned method, the present power source is recognized by the logic status of the signal end PC0 and the signal end PC2 by the controller 230. As the voltage of the native power goes higher from the threshold voltage, the values of signal PC0 and PC1 remain 0 and 1. Therefore, the other device linked to this hardware device can not exactly recognize what the magnitude of the native power of this hardware device is according to the logic status of the signal end PC0 and the signal end PC2. It therefore increases difficulty for power management.
The traditional device for recognizing power sources as the above-mentioned has the following disadvantages at least:
(1) The dimension of an electric circuit board will be increased by the installation of the recognizing electric circuit. This cannot meet the principle of being light, thin, tiny, and cute.
(2) The magnitude of the native power of the hardware device cannot be recognized according to the logic status of the signal end PC0 and the signal end PC2. It therefore increases difficulty for power management.
It is therefore an object of the invention to provide a device for recognizing power sources to reduce the usage dimension of an electric circuit board.
It is another object of the invention to provide a device for recognizing power sources, which can exactly recognize the value of a native power according to the situations of signal ends of a controller and can simplify the complexity of power management.
The invention achieves the above-identified objects by providing a device and method for recognizing power sources. This device is briefly described as following:
The device for recognizing power sources can be installed in a controller of a hardware device. It comprises two voltage dividers. The voltage-dividing device comprises two resistors, which are connected in series. And both voltage-dividing devices are coupled to the native power and output the partial voltage. It can be implemented by being coupled the output end of a voltage-dividing device to the signal end of a controller, and coupled the output end of another voltage-dividing device to another signal end of the controller. When the native power exists, both of the above-mentioned signal ends are in a high voltage level. When there is no native power, both of the above-mentioned signal ends are in a low voltage level. Because both voltage levels of the signal ends are the partial voltage of the native power, the power source of the hardware device and the value of the native power can be exactly recognized according to the voltage levels of both signal ends. Briefly speaking, the method for recognizing power sources according to this invention uses voltage dividers to feed the partial voltage of the native power into the controller. While the native power exists, the fed signals of the controller are in a high voltage level. When the native power does not exist, the fed signals of the controller are in a low voltage level. Therefore, according to the high or low level of the voltage fed from the native power, the controller can exactly recognize the power source of the hardware device and the value of the native power.